package com.lagou.config;/*
 *Author:cxz
 *@Date:${Date}
 */

import com.lagou.filter.AccessFilter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;

/*
@ClassName AuthGatewayFilterFactory

*@Description
*@Author cxz
*@Date 2020/7/11 18:44
*Version V1.0
*/
@Component
public class AuthGatewayFilterFactory extends AbstractGatewayFilterFactory<Object> {
   // @Value("${ip.max.count}")
    private int a;

    @Override
    public GatewayFilter apply(Object config) {
        System.out.println(a);
        return new AccessFilter();
    }
}
